import { Component } from '@angular/core';

@Component({
  templateUrl: './demo2.component.html',
})
export class Demo2Component {
  fields = [
    {
      label: 'Status',
      field: 'status',
      type: 'single',
      option: {
        items: [
          {
            label: 'Normal',
            value: 'normal',
          },
          {
            label: 'Error',
            value: 'error',
          },
          {
            label: 'Creating',
            value: 'creating',
          },
          {
            label: 'Mapping',
            value: 'mapping',
          },
          {
            label: 'Unmapping',
            value: 'unmapping',
          },
          {
            label: 'Deleting',
            value: 'deleting',
          },
          {
            label: 'Expanding',
            value: 'expanding',
          },
        ],
      },
    },
    {
      label: 'Checker',
      field: 'checker',
      type: 'multiple',
      option: {
        items: [
          {
            label: 'Jack',
            value: 'Jack',
          },
          {
            label: 'Tom',
            value: 'Tom',
          },
          {
            label: 'Jerry',
            value: 'Jerry',
          },
          {
            label: 'Mary',
            value: 'Mary',
          },
          {
            label: 'Ada',
            value: 'Ada',
          },
          {
            label: 'Clara',
            value: 'Clara',
          },
          {
            label: 'Alberta',
            value: 'Alberta',
          },
          {
            label: 'Agatha',
            value: 'Agatha',
          },
        ],
        lvShowCheckAll: false,
        lvShowFilter: false,
      },
    },
    {
      label: 'Commit Number',
      field: 'commitNumber',
      type: 'numberRange',
    },
    {
      label: 'Issue Number',
      field: 'issueNumber',
      type: 'number',
    },
    {
      label: 'Release Version',
      field: 'releaseVersion',
      type: 'textInput',
      mode: 'startsWith',
    },
  ];

  onChange({ selectedFilters, currentFilter }): void {
    console.log('filters:', selectedFilters);
    console.log('currentFilter:', currentFilter);
  }
}
